using System;
using System.Collections.Generic;

namespace RBAC.Read.Api.Application.Dto.Bom
{
    /// <summary>
    /// 通用六条输出项：可为天气项或岗位预警项。
    /// </summary>
    public class WeatherRoleItemDto
    {
        /// <summary>类型：weather/role</summary>
        public string Type { get; set; } = string.Empty;
        /// <summary>标题：如 城市天气/户外作业 等</summary>
        public string Title { get; set; } = string.Empty;
        /// <summary>岗位风险等级：低/中/高（仅当 Type=role 时有值）</summary>
        public string? Severity { get; set; }
        /// <summary>建议措施（仅当 Type=role 时有值）</summary>
        public List<string>? Measures { get; set; }
        /// <summary>影响时间范围描述（仅当 Type=role 时有值）</summary>
        public string? Affected { get; set; }
        /// <summary>温度（仅当 Type=weather 时有值）</summary>
        public double? Temp { get; set; }
        /// <summary>相对湿度%（仅当 Type=weather 时有值）</summary>
        public int? Humidity { get; set; }
        /// <summary>风速（m/s 或 kph，随单位）</summary>
        public double? WindSpeed { get; set; }
        /// <summary>天气主类（中文）</summary>
        public string? WeatherMain { get; set; }
        /// <summary>生成时间（本地）</summary>
        public DateTime GeneratedAt { get; set; } = DateTime.Now;
    }

    /// <summary>
    /// 岗位预警（独立复用） 
    /// </summary>
    public class RoleAlert
    {
        /// <summary>岗位名称（中文）</summary>
        public string Role { get; set; } = string.Empty;
        /// <summary>岗位风险等级：低/中/高</summary>
        public string Severity { get; set; } = "低";
        /// <summary>建议措施（中文）</summary>
        public List<string> Measures { get; set; } = new();
        /// <summary>影响时间范围描述</summary>
        public string? Affected { get; set; }
    }
}
